<?php
if(!defined("IN_IBEIKE")){
	exit('Access Denied');
}
if($_GET['token']!='iBeiKe'){
	exit('参数错误');
}else if($_GET['type']=='offical'){
	if($_GET['action']=='insert'){
		$main_data['authorid']=$_GET['authorid'];
		$main_data['subject']=$offical_data['subject']=$_GET['subject'];
		$offical_data['message']=$_GET['subject'];
		if(C::t('city_offical')->addoffical($offical_data,$main_data)){
			$res=array();
			$res['status']='ok';
		}
	}else if($_GET['action']=='delete'){
		
	}else if($_GET['action']=='modify'){
		
	}else if($_GET['action']=='push'){
		
	}
	$out=new common_convert($res);
	if($_GET['format']=='xml'){
		$out->convert_xml();
	}else{
		$out->convert_json();
	}
	echo $out->output();
}
?>